package LeetCode;

/**
 * @Author: Dijah
 * @Date: 2023/1/10 13:41
 * @Desc:
 */
public class code344_reverseString {

    public static void main(String[] args) {

        char [] s = {'h','e','l','l','o'};
        int N = s.length;
        System.out.println(s[0]);

        String str = "qwertf";
        String substring = str.substring(2, 4);
        System.out.println(substring);

        String bab = palindrome("babe", 0, 2);
        System.out.println(bab);
    }



    public static String palindrome(String s,int left,int right){
        while(left > 0 && right < s.length()  && s.charAt(left) == (s.charAt(right))){
            left++;
            right--;
        }
        return s.substring(left + 1,right);
    }
}
